/*
 *
 *
 *
 **/

#include <stdio.h>
#include <dlfcn.h>

extern ssl_api();

#define sofilename "libsslapimain.so"
typedef int(*dlapi)();

int main()
{
	void *library;
	dlapi ssl_api;
	library = dlopen(sofilename, RTLD_GLOBAL | RTLD_NOW);
	if (!library) {
		printf("open %s failed.\n", sofilename);
		return -1;
	}
	ssl_api = (dlapi)dlsym(library, "ssl_api");
	if (!library) {
		printf("load sslapi failed.\n");
		return -1;
	}

	printf("step1: call static lib api.\n");
	ssl_api();

	printf("step2: ssl user.\n");
	ssl_user();

	dlclose(library);
}


